//
//  HeaderFourBtnView.m
//  PerfectWorld
//
//  Created by dllo on 16/8/29.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "HeaderFourBtnView.h"

@implementation HeaderFourBtnView


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creatSubView:self.bounds];
    }
    return self;
}
- (void)creatSubView:(CGRect) sender {
   self.btn1 = [UIButton buttonWithType:UIButtonTypeCustom];
    _btn1.frame = CGRectMake(20, 5, 70, 40);
    [_btn1 setTitle:@"面积" forState:UIControlStateNormal];
    [_btn1 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_btn1 setImage:[UIImage imageNamed:@"向下16"] forState:UIControlStateNormal];
    [_btn1 setImage:[UIImage imageNamed:@"向上16"] forState:UIControlStateHighlighted];
    _btn1.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    [self addSubview:_btn1];
    [_btn1 addTarget:self action:@selector(btn1click:) forControlEvents:UIControlEventTouchUpInside];
    self.btn2 = [UIButton buttonWithType:UIButtonTypeCustom];
    _btn2.frame = CGRectMake(110, 5, 70, 40);
    [_btn2 setTitle:@"预算" forState:UIControlStateNormal];
    [_btn2 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_btn2 setImage:[UIImage imageNamed:@"向下16"] forState:UIControlStateNormal];
    [_btn2 setImage:[UIImage imageNamed:@"向上16"] forState:UIControlStateHighlighted];
    _btn2.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    [self addSubview:_btn2];
    [_btn2 addTarget:self action:@selector(btn2click:) forControlEvents:UIControlEventTouchUpInside];
    self.btn3 = [UIButton buttonWithType:UIButtonTypeCustom];
    _btn3.frame = CGRectMake(200, 5, 70, 40);
    [_btn3 setTitle:@"户型" forState:UIControlStateNormal];
    [_btn3 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_btn3 setImage:[UIImage imageNamed:@"向下16"] forState:UIControlStateNormal];
    [_btn3 setImage:[UIImage imageNamed:@"向上16"] forState:UIControlStateHighlighted];
    _btn3.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    [self addSubview:_btn3];
    [_btn3 addTarget:self action:@selector(btn3click:) forControlEvents:UIControlEventTouchUpInside];
    self.btn4 = [UIButton buttonWithType:UIButtonTypeCustom];
    _btn4.frame = CGRectMake(290, 5, 70, 40);
    [_btn4 setTitle:@"风格" forState:UIControlStateNormal];
    [_btn4 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_btn4 setImage:[UIImage imageNamed:@"向下16"] forState:UIControlStateNormal];
    [_btn4 setImage:[UIImage imageNamed:@"向上16"] forState:UIControlStateHighlighted];
    //    设置UIButton字体居左显示
    _btn4.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
//    _btn4.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    [self addSubview:_btn4];
    [_btn4 addTarget:self action:@selector(btn4click:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)btn1click:(UIButton *)sender { 
    
}
- (void)btn2click:(UIButton *)sender {
    
}
- (void)btn3click:(UIButton *)sender {
    
}
- (void)btn4click:(UIButton *)sender {
    
}
@end
